package com.fengxu.gamescript.provide;

import com.fengxu.gamescript.data.vo.Result;
import com.fengxu.http.FxHttp;
import com.fengxu.http.FxPath;
import com.fengxu.http.HttpMethod;

/**
 * api接口抽象接口
 */
public interface DataProvider {

    // 获取用户信息
    @FxHttp(value = "/api/user/info",method = HttpMethod.POST,throwable = false)
    Result getUserInfo();

    //  获取音乐列表
    @FxHttp(value = "/api/list/{type}/{start}/{num}", method = HttpMethod.POST, throwable = false)
    Result getMusicList(@FxPath("type") Integer type, @FxPath("start") Integer start, @FxPath("num") Integer num);

    // 获取音乐主体信息
    @FxHttp(value = "/api/detail/{id}", method = HttpMethod.POST, throwable = false)
    Result getMusicContent(@FxPath("id")String id);

    // 通过关键字搜索音乐
    @FxHttp(value = "/api/search/{type}/{kw}", method = HttpMethod.POST, throwable = false)
    Result searchMusic(@FxPath("type") Integer type, @FxPath("kw") String kw);

    // 用户签到
    @FxHttp(value = "/api/user/signIn", method = HttpMethod.POST, throwable = false)
    Result userSignIn();

    // 获取更新信息
    @FxHttp(url = "http://47.96.229.28:8080/?func=1", throwable = false)
    Result getUpdateInfo();

}
